package com.manage.project.biz.service.impl;

import java.util.Date;
import java.util.List;
import com.manage.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.manage.project.biz.mapper.BizJishupingdingMapper;
import com.manage.project.biz.domain.BizJishupingding;
import com.manage.project.biz.service.IBizJishupingdingService;

/**
 * 技术评定Service业务层处理
 *
 * @author liutao
 * @date 2022-05-03
 */
@Service
public class BizJishupingdingServiceImpl implements IBizJishupingdingService
{
    @Autowired
    private BizJishupingdingMapper bizJishupingdingMapper;

    @Override
    public BizJishupingding selectByTunnelNameAndDate(String tunnelName, String adjustDate) {
        return bizJishupingdingMapper.getByNameAndDate(tunnelName,adjustDate);
    }

    /**
     * 查询技术评定
     *
     * @param id 技术评定主键
     * @return 技术评定
     */
    @Override
    public BizJishupingding selectBizJishupingdingById(Long id)
    {
        return bizJishupingdingMapper.selectBizJishupingdingById(id);
    }

    /**
     * 查询技术评定列表
     *
     * @param bizJishupingding 技术评定
     * @return 技术评定
     */
    @Override
    public List<BizJishupingding> selectBizJishupingdingList(BizJishupingding bizJishupingding)
    {
        return bizJishupingdingMapper.selectBizJishupingdingList(bizJishupingding);
    }

    /**
     * 新增技术评定
     *
     * @param bizJishupingding 技术评定
     * @return 结果
     */
    @Override
    public int insertBizJishupingding(BizJishupingding bizJishupingding)
    {
        bizJishupingding.setCreateTime(DateUtils.getNowDate());
        return bizJishupingdingMapper.insertBizJishupingding(bizJishupingding);
    }

    /**
     * 修改技术评定
     *
     * @param bizJishupingding 技术评定
     * @return 结果
     */
    @Override
    public int updateBizJishupingding(BizJishupingding bizJishupingding)
    {
        bizJishupingding.setUpdateTime(DateUtils.getNowDate());
        return bizJishupingdingMapper.updateBizJishupingding(bizJishupingding);
    }

    /**
     * 批量删除技术评定
     *
     * @param ids 需要删除的技术评定主键
     * @return 结果
     */
    @Override
    public int deleteBizJishupingdingByIds(Long[] ids)
    {
        return bizJishupingdingMapper.deleteBizJishupingdingByIds(ids);
    }

    /**
     * 删除技术评定信息
     *
     * @param id 技术评定主键
     * @return 结果
     */
    @Override
    public int deleteBizJishupingdingById(Long id)
    {
        return bizJishupingdingMapper.deleteBizJishupingdingById(id);
    }
}
